<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/header.jsp"%>
<%@ include file="/common/menu.jsp"%>




<script>

    layui.config({
        version: '1515376178738' //为了更新 js 缓存，可忽略
    });

    //JavaScript代码区域
    layui.use(['laydate', 'laypage', 'layer','table', 'element'], function(){
        var element = layui.element;
        var $ = layui.jquery;
        var laydate = layui.laydate //日期
            ,laypage = layui.laypage //分页
            ,layer = layui.layer //弹层
            ,table = layui.table //表格
            ,element = layui.element; //元素操作
        var form = layui.form;


        //监听radio操作
        form.on('radio(radioFilter)', function(obj){
            layer.tips(this.value + ' ' + this.name + '：'+ obj.elem.checked + obj.elem.title, obj.othis);
            if(this.value == 0){
                $("#propertiesDiv").show(1000);
            }else if(this.value == 1){
                $("#propertiesDiv").hide(1000);
            }


        });

    });



</script>


<!-- 内容主体区域 -->
<div class="layui-body">

    <div style="padding: 15px;">

        <blockquote class="layui-elem-quote">
            添加XX属性
            <a class="layui-btn layui-btn-normal" href="./goodPropertyList.jsp" target="_self">属性列表</a>
        </blockquote>

        <form class="layui-form" action="" style="padding: 15px;">
            <div class="layui-form-item">
                <label class="layui-form-label">属性名称</label>
                <div class="layui-input-inline">
                    <input type="text" style="width: 500px;" name="title" lay-verify="title" lay-verify="required" autocomplete="off"
                           placeholder="请输入名称" class="layui-input">
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">属性类型</label>
                <div class="layui-input-block">
                    <input name="sex" title="商品属性" type="radio" checked="" value="商品属性">
                    <input name="sex" title="销售属性" type="radio" value="销售属性">
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">是否允许检索</label>
                <div class="layui-input-block">
                    <input name="sex" title="是" type="radio" checked="" value="1">
                    <input name="sex" title="否" type="radio" value="0">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">是否作为筛选项</label>
                <div class="layui-input-block">
                    <input name="sex" title="是" type="radio" checked="" value="1">
                    <input name="sex" title="否" type="radio" value="0">
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">相同属性值的商品是否关联</label>
                <div class="layui-input-block">
                    <input name="sex" title="是" type="radio" checked="" value="1">
                    <input name="sex" title="否" type="radio" value="0">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">属性录入方式</label>
                <div class="layui-input-block">
                    <input name="sex" title="手动录入" type="radio" checked="" value="1">
                    <input name="sex" title="选择录入" type="radio" value="0">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">该属性录入方式</label>
                <div class="layui-input-block">
                    <input name="inputType" lay-filter="radioFilter" title="手工录入" type="radio" checked="" value="1">
                    <input name="inputType" lay-filter="radioFilter" title="从下面的列表中选择(一行代表一个可选值)" type="radio" value="0">
                </div>
            </div>

            <div class="layui-form-item" style="display:none;" id="propertiesDiv">
                <label class="layui-form-label"></label>
                <div class="layui-input-block">
                    <label class="layui-form-label">属性值</label>
                    <textarea  width="500" height="300" placeholder="一行代表一条可选值，请用回车换行" class="layui-textarea"></textarea>
                </div>
            </div>





            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="demo1">确定</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>


    </div>


</div>



<%@ include file="/common/footer.jsp"%>